{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "b1cad6e5",
   "metadata": {},
   "source": [
    "# 使用窗函数设计FIR高通滤波器"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "e1e15a73",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAEXCAYAAABoPamvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAA+HUlEQVR4nO3deXxcZdn/8c+VPU260nRfaOkGdIG2QAsFE6QsiogVFRcQtyIgj/7wURDBhQcREFB5FKRSFuERLKKgLKUVGizQCm0pXYCudN+TNslkX67fH/eZZpomzUxmJuckud6vV16dOXPmnG9m0nOd+z7n3EdUFWOMMSYeKX4HMMYY0/FZMTHGGBM3KybGGGPiZsXEGGNM3KyYGGOMiZsVE2OMMXGzYtKJiUhqk+dpIjLYrzxtJSIZTX8XHzJIM9PS/Mjip/b+HEQkJ1nLNollxaRz+62IXBnxPBd4J96FisjlIjIw4vnNIvL5eJd7DAuAGcfIM1ZE+kS7MBE5R0Sub2b6PBE5v4W3TRORhU2mvS4ik6Ndb6xE5EIRSW8y7S8i8hkRGS8iE0Wkf8RrY5rbsIvIRyKSkaBYl4vInCbT1kf+PTRZ90YR6eY9PiqDt6NwVIHyXpsNPBRLOBG5/hjfYdN5J4rI5bEs37Ssy+1ZdTEfB54XkV8D9UA6kCUi9wACZAC/Ag4CB4DV3vv643Y0dnvPjweuU9W/eM8zgbdE5FbgKWA2sFpEPhGx7kxgtqqWichBYCuQChxQ1QIRWQ/UATVANlCkqmd6G5y3mvwew4A/icj+JtM/pqrlwHTgBhH5mKoeFJHl3u9aA5wEnKKq6yPetxZ4WET2q+rTEdNrvJ/mTADeDD8RkV5AX+DdyJlE5GfAfwOhiMnfDX92IlII3Kmq873njwGf8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     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#导入使用的库\n",
    "import numpy as np;from math import *\n",
    "from scipy import signal,fft\n",
    "import matplotlib.pyplot as plt\n",
    "from matplotlib.ticker import MaxNLocator\n",
    "\n",
    "#滤波器参数\n",
    "wp = 0.4*pi;ws = 0.2*pi; #通带和阻带截止频率\n",
    "wc = (wp+ws)/2;Bt = np.abs(wp-ws) #截止频率和过渡带宽\n",
    "\n",
    "#由阻带衰减As = 40，可以确定窗形状为海明窗\n",
    "N = np.ceil((6.6*pi)/Bt)+1;N = int(N+(N+1)%2)#滤波器长度点数（取奇数）\n",
    "wn = signal.windows.hamming(N) #海明窗的wn值\n",
    "\n",
    "#理想低通滤波器的单位取样响应\n",
    "t = int((N-1)/2)\n",
    "n1 = np.arange(N);n1 = np.delete(n1,t)\n",
    "hd = -np.sin(wc*(n1-t))/(pi*(n1-t))\n",
    "hd = np.insert(hd,t,(1-wc/pi))\n",
    "\n",
    "#线性相位FIR滤波器\n",
    "h = hd*wn;N0 = N*1000\n",
    "He = np.abs(fft.fft(h,N0));He = He/np.max(He)\n",
    "Ar = 20*np.log10(He);N1 = int(N0/2)\n",
    "f = np.linspace(0,1,N1)\n",
    "\n",
    "#绘制滤波器的幅度响应\n",
    "fig,ax = plt.subplots();ax.plot(f,Ar[:N1]);ax.grid()\n",
    "ax.set_title('使用海明窗设计的FIR滤波器的幅度响应');ax.set_xlabel('k')\n",
    "ax.set_xlabel(r'$ \\omega / \\pi $')\n",
    "ax.set_ylabel(r'$ 20log_{10}| H (e^{j \\omega}) | $')\n",
    "ax.set_xlim([0,1]);ax.set_ylim([-100,1])\n",
    "ax.xaxis.set_major_locator(MaxNLocator(11))\n",
    "ax.yaxis.set_major_locator(MaxNLocator(11))\n",
    "plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签\n",
    "plt.rcParams['axes.unicode_minus'] = False #用来显示负号\n",
    "fig.savefig('./fir_window1.png',dpi=500)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3a4f8d63",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
